#import <Foundation/Foundation.h>
@class DDProduct;
typedef void (^loginBlock) (NSDictionary *dict);
typedef NS_ENUM(NSInteger,RequestType){
    JTWRequestTypeLogin = 1,
    JTWRequestTypeRegister,
    JTWRequestTypeYJ_Register,
    JTWRequestTypeVisitor,
    JTWRequestTypeQuickRegister,
    JTWRequestTypeAuthenticate,
    JTWRequestTypeVerifyCode,
    JTWRequestTypeResetPWD,
    JTWRequestTypeAlterPWD,
    JTWRequestTypeBind,
    JTWRequestTypeExchange,
    JTWRequestTypePrepareZF,
    JTWRequestTypeZF,
    JTWRequestTypeUpdateRoleInfo
};
@protocol JTWRequestDelegate<NSObject>
@optional
- (void)dd_didRequestWithReceiveData:(NSDictionary *)dict error:(NSError *)error;
@end
@interface DDRequest : NSObject
@property (nonatomic, weak) id<JTWRequestDelegate>delegate;
@property (nonatomic, assign) RequestType type;
@property (nonatomic, strong) NSURLSessionTask *task;
- (void)dd_registerRequst:(NSDictionary *)dict;
- (void)dd_YJ_registerRequst;
- (void)dd_visitorRequest;
- (void)dd_loginRequest:(NSDictionary *)dict;
- (void)dd_loginRequestWithBlock:(loginBlock)block;
- (void)dd_authenticateRequest:(NSDictionary *)dict;
- (void)dd_verifyCodeRequest:(NSDictionary *)dict;
- (void)dd_resetPWDRequest:(NSDictionary *)dict;
- (void)dd_alterPWDRequest:(NSDictionary *)dict;
- (void)dd_bindRequest:(NSDictionary *)dict;
- (void)dd_prepareZFRequest:(DDProduct *)product;
- (void)dd_zfRequest:(DDProduct *)product;
- (void)dd_exchangeRequest:(NSDictionary *)dict;
- (void)yd_updateRoleInfo:(NSDictionary *)dict;
@end
